//$Id: Die.java 114 2010-11-04 08:40:38Z liangyj20030161@yahoo.com.sg $

package builders;

import java.util.Random;

/**
 * This Die class simulates a Die object where random numbers are generated
 * @author Liang Yujing
 *
 */
public class Die {
	
	public static int throwDie(){
		
		Random r = new java.util.Random();
		int rand = r.nextInt(7);
		return rand + 4;
	
	}
	
	/*
	 * for unit testing
	 */
/*	public static void main (String[] args){
		for (int i = 0; i < 100; i++){
			System.out.println(throwDie());
		}
	}*/

}
